package com.fly.model;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

public class Users
{
    private Integer id;
    
    @NotBlank(message = "用户名不能为空")
    @Length(min = 5, message = "长度大于{min}")
    private String username;
    
    @NotBlank(message = "密码不能为空")
    @Length(min = 6, max = 10, message = "长度必须在{min}-{max}")
    private String password;
    
    public Integer getId()
    {
        return id;
    }
    
    public void setId(Integer id)
    {
        this.id = id;
    }
    
    public String getUsername()
    {
        return username;
    }
    
    public void setUsername(String username)
    {
        this.username = username == null ? null : username.trim();
    }
    
    public String getPassword()
    {
        return password;
    }
    
    public void setPassword(String password)
    {
        this.password = password == null ? null : password.trim();
    }
}
